The present invention relates to altering component colors of art work associated with a drawing stroke on an electronic document.
In modern drawing programs such as Adobe Illustrator(copyright), produced by Adobe Systems Incorporated of San Jose, Calif., graphical patterns are made available to a user to enhance the aesthetics of a document. In these programs, the user is able to select a graphical pattern for a drawing the user is creating, and then manually place individual copies of the selected graphical pattern wherever desired on the drawing being created. For example, the user may desire to place a border around a drawing. The creation of the border would require the user to select a graphical pattern and then individually place multiple copies of the pattern around the periphery of the drawing. To save the user time in individually placing the graphical patterns so as to form the border or other shape, certain programs support a process known as tiling for placing graphical patterns or other shapes such that graphically pleasing borders can be produced. As discussed in U.S. application Ser. No. 08/580,472, filed on Dec. 28, 1995, and entitled xe2x80x9cAUTOMATIC GRAPHICAL PATTERN PLACEMENTxe2x80x9d, hereby incorporated by reference, a path on an electronic document is sketched by the user and a graphical pattern is selected before the graphical pattern is automatically placed along the path by a programmed computer such that the graphical pattern follows the orientation and curvature of the path. In this manner, graphically pleasing borders or shapes can be produced with only a minimal amount of user time.
Certain programs support additional enhancements on the border generation process such as changing a stroke color associated with the shape of the border. Other extensions support complex strokes which, instead of being a line, may be an art work which has been distorted to follow an outline of the shape, or a tile which has been replicated along the outline of the shape. The complex strokes are often referred to as xe2x80x9cart work strokesxe2x80x9d, while the art work that has been distorted along the shape or that composes the tile that has been replicated along the shape is called a xe2x80x9cbase art workxe2x80x9d of the stroke.
The present invention provides a computer-implemented method for altering component colors of art work associated with an art work stroke on an electronic document. In one aspect, the invention generates a darkness value for each component color of each original color; generates a new color to substitute for each original color, the component color values of the new color being generated according to the corresponding darkness value and a reference color; and alters the component colors of the art work based on the new color values.
Implementations of the invention include the following. The color generating step includes determining whether the darkness is below a predetermined threshold and if so, selecting a new color between a white value and a stroke color value. The color generating step also includes determining whether the darkness value is equal to a predetermined threshold, and if so, setting a new color to a stroke color. Moreover, the color generating step further includes determining whether the darkness value exceeds a predetermined threshold, and if so, selecting a new color between a stroke color value and a black value. Particularly, where a white color value is equal to zero and a black color value is equal to 1, the selection of the new color includes comparing the darkness value to 0.5.
In another aspect, the invention provides a computer-implemented method for altering a component color of art work by converting the color of components and a key color into a color space of a stroke color; transforming the color of the components based upon the absolute and relative differences among the key color, the component color, and a stroke color; and applying the resulting color to components of an art work stroke derived from the component of the base art work. Implementations of the second aspect may include determining whether a stroke color belongs to a red green blue (RGB) color space or to a cyan magenta yellow black (CMYK) color space and performing the appropriate conversions to the color space.
In a third aspect, a computer-implemented method for altering component colors of art work includes converting the color of components into a hue, saturations and brightness (HSB) color space; biasing hue values of a key color, a paint color, and a stroke color; transforming saturation and brightness values; mapping the hue values of the key color, the paint color, and the stroke color; unbiasing the hue values; converting the resulting color into original color space of the stroke color; and applying the resulting color to components of art work stroke derived from the component of the base art work. Implementations of the invention include taking an input hue value and linearly interpolating the hue value.
Advantages of the invention include the following. When the user creates a shape with an art work stroke and then sets the stroke color of the shape, the output is intuitive. Thus, a system requiring a minimal amount of user control and interaction is needed for applying the stroke color associated with the shape to the art work stroke. Moreover, the system needs to maintain a variation in color and preserve the integrity of the art work.
Other aspects and advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.